home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / vbcc-68k-src / machines / amiga68k / libsrc / math / fmod.c < prev    next >
C/C++ Source or Header  |  1999-01-01  |  137b  |  11 lines

  1. #include <math.h>
  2.  
  3. double fmod(double x,double y)
  4. {
  5.   double a=x/y;
  6.   if(a>=0)
  7.     return x-y*floor(a);
  8.   else
  9.     return x-y*ceil(a);
  10. }
  11.